package com.tao.mabangbang.service.impl;

import com.tao.base.feign.RemoteSmsService;
import com.tao.base.req.SendSmsVerifyCodeReq;
import com.tao.common.core.domain.response.ServiceResponse;
import com.tao.mabangbang.req.SmsLoginOrRegisterReq;
import com.tao.mabangbang.service.MbbAuthService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class MbbAuthServiceImpl implements MbbAuthService {

    @Resource
    private RemoteSmsService remoteSmsService;


    @Override
    public ServiceResponse smsLoginOrRegister(SmsLoginOrRegisterReq req) {



        return null;
    }

    @Override
    public ServiceResponse getSmsVerifyCode(String phone) {
        SendSmsVerifyCodeReq sendSmsVerifyCodeReq = new SendSmsVerifyCodeReq(phone,"mbb:",500000L);
        ServiceResponse serviceResponse = remoteSmsService.sendSmsVerifyCode(sendSmsVerifyCodeReq);
        return serviceResponse;
    }
}
